package tools;

import java.io.FileInputStream;
import java.util.Properties;

/**
 * Created by yangxianming on 2017/6/16.
 * 启动的时候加载配置文件
 */
public class ReadProperties {
    private Properties properties = new Properties();

    public Properties getProperties() {
        return properties;
    }

    private String path = System.getProperty("user.dir");

    public ReadProperties(String path){
        this.path = path;

        try {
            FileInputStream in = new FileInputStream(this.path + "//config//app.properties");
            properties.load(in);
            in.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }

}
